from .broker.base import BrokerBase
from .data.factor_look import FactorLooker
import abc
from common.variables import TimeFrameType


class BaseStrategy(abc.ABC):
    broker: BrokerBase
    looker: FactorLooker
    need_bfnames: list[str] = []
    need_symbols: list[str]
    preloads: int = 1
    timeframe: TimeFrameType

    def set_broker_model(self, model):
        self.broker = model  # type: BrokerBase

    def set_looker(self, looker):
        self.looker = looker

    @abc.abstractmethod
    def apply(self):
        pass

    def after_all(self):
        pass
